package ${model.packageFullName};

import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.annotation.FilterType;
import org.springframework.data.jdbc.repository.config.EnableJdbcRepositories;
import org.springframework.stereotype.Repository;
import org.springdoc.core.models.GroupedOpenApi;
import ace.cmp.jetcache.anno.config.EnableAceMethodCache;
import ace.cmp.spring.data.jdbc.querydsl.core.QuerydslJdbcRepositoryExtendFactoryBean;
import ${model.coreBoostrapScannerClassFullName};
import ${model.repositoryScannerClassFullName};
import ${model.modulePropertiesClassFullName};

/**
* boostrap auto config.
*
* @author Caspar
*/
@EnableAspectJAutoProxy(exposeProxy = true)
@EnableAceMethodCache(basePackageClasses = {${model.coreBoostrapScannerClassName}.class})
@EnableConfigurationProperties({${model.modulePropertiesClassName}.class})
@EnableJdbcRepositories(basePackageClasses = {${model.repositoryScannerClassName}.class}, repositoryFactoryBeanClass = QuerydslJdbcRepositoryExtendFactoryBean.class)
@ComponentScan(basePackageClasses = ${model.coreBoostrapScannerClassName}.class,
    excludeFilters = {
          @ComponentScan.Filter(type = FilterType.ANNOTATION, classes = Repository.class)
    })
@Configuration
public class ${model.className} {
    @Bean
    public GroupedOpenApi ${model.projectModuleName}GroupedOpenApi() {
        return GroupedOpenApi.builder()
                .group("${model.projectModuleName}")
                .displayName("${model.projectModuleDisplayName}")
                .packagesToScan(${model.coreBoostrapScannerClassName}.class.getPackageName())
                .build();
    }
}